package com.zrh.jsd.service.studydemo.json_produce_export;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class JsonProduceExport {
    public static void main(String[] args) {
        List<Object> agencyList = new ArrayList<Object>();
        Map<String, Object> agencyMap = new HashMap<>();
        agencyMap.put("agencyName", "agencyName");
        agencyMap.put("agencyAddress", "agencyAddress");
        agencyMap.put("companyName", "companyName");
        agencyMap.put("logoImageId", "logoImageId");
        agencyMap.put("auctionAddress", "agencyAuctionAddress");
        agencyMap.put("logoImage", "logoImage");
        agencyList.add(agencyMap);

        String jsonString = JSON.toJSONString(agencyList);
        System.out.println(jsonString);
        CreateFileUtil.createJsonFile(jsonString, "D:/a/", "agency");
    }
}
